package cn.marinda.totipotentwar.global;

import cn.marinda.totipotentwar.TotipotentWar;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;

/**
 * 抽象图形用户界面
 *
 * @author hwj
 * @date 2022/01/31
 */
public abstract class AbstractGui implements GameInventory{

    private int size;
    private String guiName;
    private Inventory inventory;
    private String title;

    /**
     * 抽象图形用户界面
     *
     * @param size    大小
     * @param guiName gui的名字
     */
    public AbstractGui(int size,String guiName,String title){
        this.size = size;
        this.guiName = guiName;
        this.title = title;
        this.inventory = Bukkit.createInventory(null,size,title);
    }

    /**
     * 抽象图形用户界面
     *
     * @param guiName gui的名字
     * @param title   标题
     */
    public AbstractGui(String guiName,String title){
        this.guiName = guiName;
        this.title = title;

    }


    /**
     * 默认设置
     */
    public abstract void defaultSetting();


    public Inventory getInventory() {
        return inventory;
    }

    public void setInventory(Inventory inventory) {
        this.inventory = inventory;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public String getGuiName() {
        return guiName;
    }

    public void setGuiName(String guiName) {
        this.guiName = guiName;
    }
}
